﻿#define _CRT_SECURE_NO_WARNINGS 

//编写代码，演⽰多个字符从两端移动，向中间汇聚
#include <stdio.h>
#include <string.h>
#include <windows.h>
int main()
{
	char arr1[] = { "lipeixin is very cute!!!" };
	char arr2[] = { "************************" };
	int left = 0;
	size_t right = strlen(arr2) - 1;
	while (left <= right)
	{
		arr2[left] = arr1[left];
		arr2[right] = arr1[right];
		printf("%s\n", arr2);
		left += 1;
		right -= 1;
		Sleep(1000);//休眠函数 单位为毫秒 意为执行完上面语句后休眠()毫秒
		system("cls");//system执行系统指令 cls意为清屏
	}
	printf("%s\n", arr2);
}